#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <cstring>

using namespace std;
// Static variable is not inclded in object
// This variable belonged to class
class A {
public:
    int m_i;
    void foo(/* const A* this */) const {//Common fiction
        cout << "A::foo" << endl;

        cout << m_i << endl;            //ok
        //              cout << m_si << endl;           //ok
        bar();                          //ok
    }

    static int m_si;
    static void bar(/*There is not a argument which called 'this'*/) {
        cout << "A::bar" << endl;
        cout << m_si << endl;   //ok
        //cout << m_i << endl;  //err
        //foo();                //err
    }

};

int A::m_si = 0;

int main(void) {
    A a{}, b{};

    a.foo();
    b.foo();

    A::bar();// The fiction is restrainted by scope
    a.bar();// But the static fiction can alse be invoked by object
    b.bar();// Such as A::bar();

    return 0;
}
